import React from 'react'
import {Router,Route,Switch} from 'react-router-dom'
import Login from '@/pages/Login/Login.jsx'
import Layout from '@/pages/Layout/Layout.jsx'
import NotFound from '@/pages/NotFound/NotFound.jsx'
import history from './utils/history'
// import { BrowserRouter } from 'react-router-dom'
import PrivateRoute from './components/PrivateRoute'
// BrowserRouter=Route+BrowerHistory

function Abc(){
  return <h1>abc</h1>
}
class App extends React.Component {
  render() {
    return <div className='app' >
      {/* <BrowserRouter> */}
      <Router history={history}>
      <Switch>
           <Route path='/login' component={Login}></Route>
           <PrivateRoute path='/home' component={Layout}></PrivateRoute>   
          <PrivateRoute path='/abc' component={Abc}></PrivateRoute>
           <Route  component={NotFound}></Route>
      </Switch>
      </Router>
      {/* </BrowserRouter> */}
    </div>
  }
}
export default App